/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.util.image;

import java.awt.Image;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

import javax.imageio.ImageIO;

public class WebClientUtil {
	public static Image requestImage(String url) throws IOException
    {
		URL requestUrl = new URL( url );
        URLConnection con = requestUrl.openConnection();
        InputStream input=con.getInputStream();
        
        Image image=ImageIO.read(input);
        return image;
    }
}